extends ../main

block append body
    div#orderList.panel.box-shadow-none.content-header
        div.panel-body
            div.col-md-12
                h3.animated.fadeInLeft 订单管理
                p.animated.fadeInDown
                    | 订单管理&nbsp;
                    span.fa-angle-right.fa
                        | &nbsp;订单列表
    div.col-md-12.top-20.padding-0
        div.col-md-12
            div.panel
                div.panel-body
                    div#toolbar.btn-group
                        button#btn_add.btn.btn-default(type="button")
                            span.glyphicon.glyphicon-plus(aria-hidden="true") 新增
                        button#btn_edit.btn.btn-default(type="button")
                            span.glyphicon.glyphicon-plus(aria-hidden="true") 修改
                        button#btn_del.btn.btn-default(type="button")
                            span.glyphicon.glyphicon-plus(aria-hidden="true") 删除
                    table#orderTable


block append footer
    script(type="text/javascript").
        $(function(){
            var app = new Vue({
                el:"#orderList",
                data:{},
                methods:{
                    init:function () {
                        var columns=[{
                            checkbox:'ture'
                        },{
                            field:'prodName',
                            width:'10%',
                            title:'商品名称'
                        },{
                            field:'prodspec',
                            width:'10%',
                            title:'商品规格'
                        },{
                            field:'prodNumber',
                            width:'10%',
                            title:'商品数量'
                        },{
                            field:'totalPrice',
                            width:'10%',
                            title:'总价'
                        },{
                           field:'userName',
                           width:'10%',
                           title:'用户姓名'
                        },{
                            field:'telephone',
                            width:'10%',
                            title:'联系电话'
                        },{
                            field:'address',
                            width:'17%',
                            title:'联系地址'
                        },{
                            field:'sendTime',
                            width:'10%',
                            title:'发货时间'
                        },{
                            field:'orderStatus',
                            width:'10%',
                            title:'订单状态'
                        }];
                        var tableInit = zxlib.datatable("orderTable", "order_id", "/manager/order/getorderList", columns);
                        console.log(tableInit);
                        tableInit.init();

                        var oButtonInit = new ButtonInit();
                        oButtonInit.Init();

                    }
                }
            });

            app.init();
        });


        var ButtonInit = function () {
            var oInit = new Object();

            oInit.Init = function () {
                //初始化页面上面的按钮事件
                $('#btn_add').click(function () {

                });

                $('#btn_edit').click(function () {

                });

                $('#btn_delete').click(function () {

                });
            };

            return oInit;
        };


